﻿<%@ Page Title="Directory of a Category" Language="C#" MasterPageFile="~/GuestView.master" AutoEventWireup="true"
    CodeBehind="ListOfCategoryLevel1.aspx.cs" Inherits="BestBuy.PageGuest.ListOfCategoryLevel1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script language="javascript" type="text/javascript">
        function Explain(controlClick, item) {
            var t = document.getElementById(item.toString());
            if (t != null) {
                if (t.className == "gridviewHide") {
                    t.className = "gridviewShow";
                    controlClick.innerHTML = 'Less...';
                } else {
                    t.className = "gridviewHide";
                    controlClick.innerHTML = 'More...';
                }
            }
        } 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="padding: 20px 0px 10px 20px;">
        <a href="../Default.aspx">Home </a>> <a href="ListCategory.aspx">Products</a> >
        <asp:Label ID="lbLinkHeader" runat="server"></asp:Label>
    </div>

    <div class="left-side-bar bs-docs-sidebar">
        <div class="nav nav-list bs-docs-sidenav">
            <div style="padding:10px 0px 10px 10px; margin-top:10px;">
                <asp:Label ID="lbCategoryName" runat="server" CssClass="font-header"></asp:Label>
            </div>
            <asp:GridView ID="gvCategories" runat="server" AutoGenerateColumns="False" Width="100%"
                ShowHeader="false" GridLines="None" OnRowDataBound="gvCategories_OnRowDataBound">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>' class="ListCategory_level1">
                                <%#Eval("TenDanhMuc") %></a>
                            <asp:Label ID="lbQuantity1" runat="server"></asp:Label>
                            <asp:GridView ID="gvItem1" runat="server" ShowHeader="false" ShowFooter="false" GridLines="None"
                                AutoGenerateColumns="false">
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                                <%#Eval("TenDanhMuc") %></a>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="ListCategory_item" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                            <asp:GridView ID="gvItem1More" runat="server" CssClass="gridviewHide" ShowHeader="false"
                                ShowFooter="false" GridLines="None" AutoGenerateColumns="false">
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                                <%#Eval("TenDanhMuc") %></a>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="ListCategory_item" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                            <asp:Panel ID="pnMoreLess1" runat="server" Visible="false">
                                <a onclick="Explain(this,'<%#((GridViewRow)Container).FindControl("gvItem1More").ClientID%>');"
                                    class="MoreLess_link">More...</a>
                            </asp:Panel>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
    <div class="main-content-product">
        <div class="row">
            <div class="span10" style="width: 70%">
                <div class="duongvien">
                    <h1 class="trangchu_h1">
                        Most Popular in <asp:Label ID="lbNameMostPopular" runat="server"></asp:Label>
                    </h1>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgMostPopular1" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:HyperLink ID="hlMostPopular1" runat="server"></asp:HyperLink>
                                </h4>
                                <asp:DataList ID="dlMostPopular1" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgMostPopular2" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:HyperLink ID="hlMostPopular2" runat="server"></asp:HyperLink>
                                </h4>
                                <asp:DataList ID="dlMostPopular2" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgMostPopular3" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:HyperLink ID="hlMostPopular3" runat="server"></asp:HyperLink>
                                </h4>
                                <asp:DataList ID="dlMostPopular3" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgMostPopular4" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:HyperLink ID="hlMostPopular4" runat="server"></asp:HyperLink>
                                </h4>
                                <asp:DataList ID="dlMostPopular4" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="duongvien">
                    <h1 class="trangchu_h1">
                        Latest Products
                    </h1>
                    <asp:DataList ID="dlLatestProducts" runat="server" RepeatColumns="4">
                        <ItemTemplate>
                            <div class="productItem">
                                <div>
                                    <a href='ProductDetail.aspx?ma=<%#Eval("IDSanPham") %>'>
                                        <img id="Img1" runat="server" class="img_product" src='<%# CheckHinhAnh(Eval("HinhAnh")) %>'
                                            height="130" width="150" /></a>
                                </div>
                                <div class="magin_tensanpham">
                                    <span><a href='ProductDetail.aspx?ma=<%#Eval("IDSanPham") %>'>
                                        <%# Eval("TenSanPham") %></a> </span>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                </div>
                <div class="duongvien">
                    <h1 class="trangchu_h1">
                        <asp:Label ID="lbNameProduct" runat="server"></asp:Label>
                    </h1>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgProduct1" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:Label ID="lbProduct1" runat="server"></asp:Label>
                                </h4>
                                <asp:DataList ID="dlProduct1" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgProduct2" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:Label ID="lbProduct2" runat="server"></asp:Label>
                                </h4>
                                <asp:DataList ID="dlProduct2" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgProduct3" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:Label ID="lbProduct3" runat="server"></asp:Label>
                                </h4>
                                <asp:DataList ID="dlProduct3" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                    <div class="display-tow-column">
                        <div class="media">
                            <a class="pull-left">
                                <asp:Image ID="imgProduct4" runat="server" Height="100" Width="100" />
                            </a>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    <asp:Label ID="lbProduct4" runat="server"></asp:Label>
                                </h4>
                                <asp:DataList ID="dlProduct4" runat="server" RepeatColumns="5" RepeatLayout="Flow">
                                    <ItemTemplate>
                                        <a href='ListProductOfCategory.aspx?pid=<%#Eval("IDDanhMuc")%>'>
                                            <%#Eval("TenDanhMuc")%></a>,
                                    </ItemTemplate>
                                </asp:DataList>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="span3 quangcao-border">
                <ul class="nav nav-list bs-docs-sidenav" id="ulParent">
                    <li class="active" style="text-align: center; margin-left:4px;"><a>Advertising</a></li>
                </ul>
                <img src="../Images/QuangCao/quangcao1.jpg" />
                <img src="../Images/QuangCao/quangcao4.jpg" />
                <img src="../Images/QuangCao/quangcao2.jpg" />
                <img src="../Images/QuangCao/quangcao3.jpg" />
                <img src="../Images/QuangCao/quangcao5.jpg" />
            </div>
        </div>
    </div>
</asp:Content>
